//
//  TextFieldCell.m
//  League
//
//  Created by JackChen on 2018/2/19.
//  Copyright © 2018年 ciyuanjuzhen. All rights reserved.
//

#import "TextFieldCell.h"

@interface TextFieldCell ()<UITextFieldDelegate>

@end

@implementation TextFieldCell

- (void)awakeFromNib {
    [super awakeFromNib];
    self.contentTextField.delegate = self;
}

- (void)textFieldDidEndEditing:(UITextField *)textField {
    ProfileManager *manager = [ProfileManager shareManager];
    if (self.state == ProfileUserNameState) {
        manager.username = textField.text;
        manager.realname = textField.text;
    }
    if (self.state == ProfileEmailState) {
        manager.email = textField.text;
    }
    if (self.state == ProfileAboutMeState) {
        manager.aboutme = textField.text;
    }
}

@end
